<?php

use Drupal\s_commerce_service\Entity\SCommerceService;
use Drupal\s_commerce_service\Entity\SCommerceServiceLine;

function s_commerce_service_s_commerce_service_add_page() {
  $e = new SCommerceService();
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_entity_form', $e, 'add');
}

function s_commerce_service_s_commerce_service_view_page(SCommerceService $e) {
  return entity_view($e->entityType(), [$e]);
}

function s_commerce_service_s_commerce_service_edit_page(SCommerceService $e) {
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_entity_form', $e, 'edit');
}

function s_commerce_service_s_commerce_service_delete_page(SCommerceService $e) {
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_delete_form', $e);
}

function s_commerce_service_s_commerce_service_line_add_page() {
  $e = new SCommerceServiceLine();
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_line_entity_form', $e, 'add');
}

function s_commerce_service_s_commerce_service_line_view_page(SCommerceServiceLine $e) {
  return entity_view($e->entityType(), [$e]);
}

function s_commerce_service_s_commerce_service_line_edit_page(SCommerceServiceLine $e) {
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_line_entity_form', $e, 'edit');
}

function s_commerce_service_s_commerce_service_line_delete_page(SCommerceServiceLine $e) {
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_s_commerce_service_line_delete_form', $e);
}

function s_commerce_service_clear_page() {
  module_load_include('inc', 's_commerce_service', 's_commerce_service.forms');
  return drupal_get_form('s_commerce_service_clear_form');
}
